prime Factorization method